
pub struct Dialog {}

impl Dialog {

    /// 弹出警告框
    pub fn alert(message: &str) {
        let content = format!(r#"
            layui.use(['layer'], function() {{
                let layer = layui.layer;
                layer.alert('{}');
            }});
        "#, message);
        let _result = js_sys::eval(&content);
    }
}
